<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>数字排序</title>
    <style>
        .container {
            width: 300px;
            margin: 50px auto;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        label {
            display: block;
            margin-bottom: 5px;
        }
        input[type="number"] {
            width: 100%;
            padding: 5px;
            border: 1px solid #ddd;
            border-radius: 3px;
        }
        button {
            background-color: #4CAF50;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 3px;
            cursor: pointer;
        }
        button:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <div class="container">
        <h2>请输入三个数字</h2>
        <form action="value.jsp" method="post">
            <div class="form-group">
                <label for="num1">第一个数字：</label>
                <input type="number" id="num1" name="num1" required>
            </div>
            <div class="form-group">
                <label for="num2">第二个数字：</label>
                <input type="number" id="num2" name="num2" required>
            </div>
            <div class="form-group">
                <label for="num3">第三个数字：</label>
                <input type="number" id="num3" name="num3" required>
            </div>
            <button type="submit">排序</button>
        </form>

        <%
        String num1 = request.getParameter("num1");
        if(num1 != null && !num1.isEmpty()) {
        %>
            <jsp:include page="order.jsp">
                <jsp:param name="num1" value="<%= num1 %>"/>
                <jsp:param name="num2" value="<%= request.getParameter(\"num2\") %>"/>
                <jsp:param name="num3" value="<%= request.getParameter(\"num3\") %>"/>
            </jsp:include>
        <%
        }
        %>
    </div>
</body>
</html>